<!DOCTYPE HTML>
<html>
 <head>
  <title> New Document </title>
  <meta charset="UTF-8" />
  <meta name="Generator" content="NPP-Plugin">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <script type="text/javascript" src="http://cdn.bootcss.com/jquery/2.1.3/jquery.min.js"></script>
  <script type="text/javascript">
    $(document).ready(function(){
	  $("h2").siblings().css({"color":"red","border":"2px solid red"});
	});
  </script>
  <style>
	/* 这里是CSS代码,该类之下的所有元素,无论层级应用样式 */
	.siblings * 
	{ 
	display: block;		/*定义为块级元素*/
	border: 2px solid lightgrey;
	color: lightgrey;
	padding: 5px;
	margin: 15px;
	}
  </style>

 </head>
 <body  class="siblings">
	 <div>div (父)
	  <p>p</p>
	  <span>span</span>
	  <h2>h2</h2>
	  <h3>h3</h3>
	  <p>p</p>
	</div>


 </body>
</html>



